//
//  SWCheckData.h
//  SerialPort
//
//  Created by MT-SW-003 on 2021/4/9.
//  Copyright © 2021 MT-SW-003. All rights reserved.
//

#import "Serial.h"

NS_ASSUME_NONNULL_BEGIN

@interface SWCheckData : NSObject
{
    /* serial config */
    NSString *devPath;
    int baudRate,dataBit,stopBit;
    NSString *parity;
    
    /* serial param list*/
    NSArray *baudRateArray;
    NSArray *dataBitArray;
    NSArray *stopBitArray;
    NSArray *parityArray;
}
- (id)initWithSerialData:(id)serialParamData withConfigData:(id)configData;
- (BOOL)checkConfigData;
- (BOOL)checkWriteData:(char *)inputWriteData;
- (BOOL)checkReadData:(char *)readData andExpectedData:(char *)expectedData;

@property(readonly) int baudRate,dataBit,stopBit;
@property(readonly) NSString *parity;
@property(readonly) NSString *devPath;

@property(readonly) NSArray *baudRateArray;
@property(readonly) NSArray *dataBitArray;
@property(readonly) NSArray *stopBitArray;
@property(readonly) NSArray *parityArray;

@end

NS_ASSUME_NONNULL_END
